import {request} from '@/utils/request'


const post = (url, params) => {
  return request(url, 'post', params)
}

const getById = (url, id) => {
  // const tUrl = url + '/' + id
  return request(url, 'get', {id: id})
}

const get = (url, params) => {
  return request(url, 'get', params)
}

const del = (url, id) => {
  return request(url+'/?id='+id, 'delete')
}

const custom = request

export default {
  post,
  getById,
  get,
  del,
  custom
};


